<template>
  <div>
    <ux-grid ref="singleTable" :data="AData" style="width: 100%" border :header-cell-style="{
      color: 'rgba(0, 0, 0, 0.85)',
      fontSize: '14px',
      textAlign: 'left',
      fontWeight: 'bold',
      padding: 0,
      height: '80px',
    }" :row-style="{
      color: 'rgba(96,98,102,1)',
      fontSize: '13px',
      textAlign: 'left',
      padding: 0,
      height: '32px',
    }" :cell-style="cellStyle" @current-change="handleCurrentChange" highlight-current-row :height="tableHeight"
      v-loading="loading" element-loading-spinner="el-icon-loading" element-loading-background="#f8f8f8"
      :element-loading-text="$t('message.bhView.loading')">
      <template slot="empty"> {{ AFlg ? '最新データ取込中' : 'No Data' }} </template>
      <!-- スプールNo.
      ポイントNo.
      C.L番号
      検査工事項目
      検査工事目的
      損傷要因
      重災管理
      部位
      サイズ
      足場工事
      保温保冷
      元肉厚
      管理基準
      影響度
      漏洩確率
      漏洩確率算出日
      検査回数
      リスクレベル
      前回測定年月
      前回測定値（mm）
      測定年月
      測定値
      腐食速度・短期
      腐食速度・長期
      腐食速度・L.S.
      余寿命
      リスクベース余寿命
      次回時期余寿命
      拡大検査要否
      現在の保全方式
      現状・基準年月
      現状・周期
      現状・次回時期
      検査メモ
      スケール状況
      措置対応
      代表点・設置有無
      見直し周期・次回時期
      見直し周期・保全方式
      変更後周期・要確認
      改定理由
      改定理由コード -->

      <ux-table-column title="スプールNo." :resizable="false" width="200" align="center" fixed="left">
        <template slot-scope="scope">
          <p style="white-space: pre;">
            {{ scope.row.macNumb }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="ポイントNo." :resizable="false" width="120" align="center" fixed="left">
        <template slot-scope="scope">
          <p style="white-space: pre;">
            {{ scope.row.pointNo }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="C.L.番号" :resizable="false" width="160" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;">
            {{ scope.row.clName }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="検査工事項目" :resizable="false" width="120" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;">
            {{ scope.row.mCodName }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="検査工事目的" :resizable="false" width="160" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;">
            {{ scope.row.f1CodName }}
          </p>
        </template>
      </ux-table-column>

      <ux-table-column title="損傷要因" :resizable="false" width="160" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;">
            {{ scope.row.strConcat }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="重災管理" :resizable="false" width="100" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;">
            {{ scope.row.f5CodName }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="部位" :resizable="false" width="120" align="center">
        <template slot-scope="scope">
          <!-- <el-tooltip class="item" effect="dark" :content="scope.row.rait" placement="top-start"> -->
          <p style="white-space: pre;">
            {{ scope.row.posCodName }}
          </p>
          <!-- </el-tooltip> -->
        </template>
      </ux-table-column>
      <ux-table-column title="サイズ" :resizable="false" width="120" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;">
            {{ scope.row.siz }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="足場工事" :resizable="false" width="100" align="center">
        <template slot-scope="scope">
          <!-- <el-tooltip class="item" effect="dark" :content="scope.row.mate" placement="top-start"> -->
          <p style="white-space: pre;text-align: center;">
            {{ scope.row.icCodName }}
          </p>
          <!-- </el-tooltip> -->
        </template>
      </ux-table-column>
      <ux-table-column title="保温保冷" :resizable="false" width="100" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;">
            {{ scope.row.ttCodName }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="元肉厚" :resizable="false" width="80" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">元肉厚</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">(mm)</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: right;">
            {{ scope.row.orgThck }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="管理基準" :resizable="false" width="80" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">管理基準</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">(mm)</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: right;">
            {{ scope.row.mgtThck }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="影響度" :resizable="false" width="100" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;">
            {{ scope.row.afCodName }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="漏洩確率" :resizable="false" width="100" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;" :style="{ background: scope.row.colorLk }">
            {{ scope.row.leakKbn }}
          </p>
        </template>
      </ux-table-column>
      <!-- <ux-table-column title="漏洩確率算出日" :resizable="false" width="100" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">漏洩確率</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">算出日</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;">
            {{ scope.row.leakKbnDt }}
          </p>
        </template>
      </ux-table-column> -->
      <ux-table-column title="検査回数" :resizable="false" width="80" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: right;">
            {{ scope.row.ispCnt }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="リスクレベル" :resizable="false" width="100" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">リスク</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">レベル</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;" :style="{ background: scope.row.colorRsk }">
            {{ scope.row.riskLvl }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="前回測定年月" :resizable="false" width="100" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">前回</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">測定年月</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;">
            {{ scope.row.lstIspTim }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="前回測定値（mm）" :resizable="false" width="80" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 45px;">
            <p style="height: 14px;text-align: center;">前回</p>
            <p style="height: 14px;margin-top: 5px;text-align: center;">測定値</p>
            <p style="height: 14px;margin-top: 5px;text-align: center;">(mm)</p>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: right;">
            {{ scope.row.lstThck }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="測定年月" :resizable="false" width="100" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;">
            {{ scope.row.finIspTim }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="測定値" :resizable="false" width="80" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">測定値</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">(mm)</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: right;">
            {{ scope.row.finThck }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="腐食速度・短期" :resizable="false" width="80" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">腐食速度</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">短期</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: right;" :style="{ background: scope.row.colorLst }">
            {{ scope.row.lstLstThk }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="腐食速度・長期" :resizable="false" width="80" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">腐食速度</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">長期</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: right;" :style="{ background: scope.row.colorOrg }">
            {{ scope.row.ogLstThk }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="腐食速度・L.S." :resizable="false" width="80" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">腐食速度</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">L.S.</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: right;" :style="{ background: scope.row.colorFin }">
            {{ scope.row.finLstThk }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="余寿命" :resizable="false" width="80" align="center">
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: right;" :style="{ background: scope.row.colorLif }">
            {{ scope.row.remLife }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="リスクベース余寿命" :resizable="false" width="100" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">ﾘｽｸﾍﾞｰｽ</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">余寿命</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;" :style="{ background: scope.row.colorRlif }">
            {{ scope.row.riskLife }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="次回時期余寿命" :resizable="false" width="80" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">次回時期</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">確認</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;">
            {{ scope.row.chkNext }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="拡大検査要否" :resizable="false" width="80" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">拡大検査</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">要否</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;">
            {{ scope.row.ispExpand }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="現在の保全方式" :resizable="false" width="100" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">現状</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">保全方式</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;">
            {{ scope.row.sCodName }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="現状・基準年月" :resizable="false" width="100" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">現状</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">基準年月</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;">
            {{ scope.row.curStdDate }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="現状・周期" :resizable="false" width="80" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">現状</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">周期</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: right;">
            {{ scope.row.curCyc }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="現状・次回時期" :resizable="false" width="100" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">現状</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">次回時期</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;text-align: center;">
            {{ scope.row.curNextYear }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="検査メモ" :resizable="false" width="240" align="center">
        <template slot-scope="scope">
          <el-input v-model="scope.row.ispResult" class="table-input" v-if="scope.row.approval == '0'"
            @input="scope.row.ispResult = $setMaxLength(scope.row.ispResult, 100), scope.row.is_chg = 1, $emit('changeFn', false)">
          </el-input>
          <p v-else>{{ scope.row.ispResult }}</p>
        </template>
      </ux-table-column>
      <ux-table-column title="スケール状況" :resizable="false" width="240" align="center">
        <template slot-scope="scope">
          <el-input v-model="scope.row.scaleState" class="table-input" v-if="scope.row.approval == '0'"
            @input="scope.row.scaleState = $setMaxLength(scope.row.scaleState, 200), scope.row.is_chg = 1, $emit('changeFn', false)">
          </el-input>
          <p v-else>{{ scope.row.scaleState }}</p>
        </template>
      </ux-table-column>
      <ux-table-column title="措置対応" :resizable="false" width="240" align="center">
        <template slot-scope="scope">
          <el-input v-model="scope.row.stepCorres" class="table-input" v-if="scope.row.approval == '0'"
            @input="scope.row.stepCorres = $setMaxLength(scope.row.stepCorres, 200), scope.row.is_chg = 1, $emit('changeFn', false)">
          </el-input>
          <p v-else>{{ scope.row.stepCorres }}</p>
        </template>
      </ux-table-column>

      <ux-table-column title="代表点・設置有無" :resizable="false" width="160" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">代表点</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">設置有無</span>
          </div>
        </template>
        <template slot-scope="scope">
          <el-select placeholder=" " v-model="scope.row.representPnt" class="table-input"
            v-if="scope.row.approval == '0'" @change="scope.row.is_chg = 1, $emit('changeFn', false)">
            <el-option v-for="(item, index) in AListCombox.representative" :key="index" :label="item"
              :value="item"></el-option>
          </el-select>
          <p v-else style="text-align: center;">{{ scope.row.representPnt }}</p>
        </template>
      </ux-table-column>
     
      <ux-table-column title="見直し周期・保全方式" :resizable="false" width="100" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">見直し周期</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">保全方式</span>
          </div>
        </template>
        <template slot-scope="scope">
          <el-select placeholder=" " v-model="scope.row.reConVal" class="table-input" v-if="scope.row.approval == '0'"
            @change="getReConValApi(scope.row.reConVal, scope.row.finIspTim, scope.row._index), scope.row.is_chg = 1, $emit('changeFn', false)">
            <el-option v-for="(item, index) in AListCombox.reviewPeriod" :key="index" :label="item"
              :value="item"></el-option>
          </el-select>
          <p v-else style="text-align: center;">{{ scope.row.reConVal }}</p>
        </template>
      </ux-table-column>
      <ux-table-column title="見直し周期・次回時期" :resizable="false" width="100" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">見直し周期</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">次回時期</span>
          </div>
        </template>
        <template slot-scope="scope">
          <el-date-picker v-model="scope.row.reNextYear" class="table-input1" v-if="scope.row.approval == '0'"
            size="mini" :format="format" :value-format="format" type="month" placeholder=" "
            @change="scope.row.is_chg = 1, $emit('changeFn', false)">
          </el-date-picker>
          <p v-else style="text-align: center;">{{ scope.row.reNextYear }}</p>
        </template>
      </ux-table-column>
      <ux-table-column title="変更後周期・要確認" :resizable="false" width="100" align="center">
        <template slot="header">
          <div style="display: flex; flex-direction: column;height: 100%;line-height: 66px;">
            <span style="display: inline-block;height: 14px;text-align: center;">変更後周期</span>
            <span style="display: inline-block;height: 14px;margin-top: 5px;text-align: center;">要確認</span>
          </div>
        </template>
        <template slot-scope="scope">
          <p style="white-space: pre;">
            {{ scope.row.alertCyc }}
          </p>
        </template>
      </ux-table-column>
      <ux-table-column title="改定理由" :resizable="false" width="160" align="center">
        <template slot-scope="scope">
          <el-input v-model="scope.row.reReason" class="table-input" v-if="scope.row.approval == '0'"
            @input="scope.row.reReason = $setMaxLength(scope.row.reReason, 200), scope.row.is_chg = 1, $emit('changeFn', false)">
          </el-input>
          <p v-else>{{ scope.row.reReason }}</p>
        </template>
      </ux-table-column>
      <ux-table-column title="改定理由コード" :resizable="false" width="120" align="center" ipt="true">
        <template slot-scope="scope">
          <el-select placeholder=" " v-model="scope.row.acCodName" class="table-input" v-if="scope.row.approval == '0'"
            @change="getReasCodeApi(scope.row.acCodName, scope.row._index), scope.row.is_chg = 1, $emit('changeFn', false)">
            <el-option v-for="(item, index) in AListCombox.cycleChangeCode" :key="index" :label="item"
              :value="item"></el-option>
          </el-select>
          <p v-else>{{ scope.row.acCodName }}</p>
        </template>
      </ux-table-column>

    </ux-grid>
    <!-- <div class="bottomView">{{ pageDes }}</div> -->
  </div>
</template>

<script>
// import $ from 'jquery'
import eventBus from "@/eventBus/bus";
import _ from 'lodash-es';
import { getReConVal, getReasCode } from "@/api/api1";

// 导出模块
export default {
  // 模块名字
  name: "MSDetailTabel",
  props: {
    tableHeight: Number,
    AData: Array,
    AListCombox: Object,
    pageDes: String,
    LAB: Array,
    loading: Boolean,
    tabelDataConfig: Array,
    empty: String,
    Month: Object,
    currentDiff: Number,
    AFlg: Boolean,
  },

  // 模块数据
  data() {
    //数据
    return {
      DateList: [],
      activeNum: 0,

      currentRow: {},
      nextRow: {},
      currentIndex: 0,
      nextIndex: 0,
      format: 'yyyy-MM',
    };
  },
  // 注册组件
  components: {},
  // 监听指定值，只有指定值变化，才会触发
  watch: {
    AData: {
      handler(nval, oval) {
        // console.log(nval.reNextYear, nval.reConVal, oval.reNextYear, oval.reConVal);
      },
      immediate: true,
      deep: true,
    },
  },
  // 里面的函数只有调用才会执行（实时计算）里面是定义的方法
  methods: {
    setCurrentRowFn(index) {
      this.$refs.singleTable.setCurrentRow(this.AData[index]);
      if (index > 7) {
        this.$refs.singleTable.pagingScrollTopLeft((index - 7) * 32);
      } else {
        this.$refs.singleTable.pagingScrollTopLeft(0);
      }
    },
    refreshColumnFn() {
      this.$refs.singleTable.refreshColumn()
    },

    //  获取 見直し周期次回時期(通过选择列表内的-見直し周期保全方式
    async getReConValApi(reConVal, finIspTim, _index) {
      let dataJson = {
        reConVal, finIspTim
      };
      getReConVal(dataJson).then((res) => {
        console.log('getReConValApi', res.data.data, _index, this.AData[_index]);
        if (res.data.code != 0) {
          this.AData[_index].reNextYear = '';
          return
        }
        this.AData[_index].reNextYear = res.data.data;
      });
    },

    //  获取 見直し周期次回時期(通过选择列表内的-見直し周期保全方式
    async getReasCodeApi(CycChangeName, _index) {
      let dataJson = {
        CycChangeName
      };
      getReasCode(dataJson).then((res) => {
        console.log('getReasCodeApi', this.AData[_index].re_reas_code);
        if (res.data.code != 0) {
          return
        }
        this.AData[_index].re_reas_code = res.data.data;
        console.log('getReasCodeApi', this.AData[_index].re_reas_code);
      });
    },

    // 表格样式
    cellStyle({ row, column, rowIndex, columnIndex }) {
      let style = {
        color: "rgba(96,98,102,1)",
        fontSize: "14xpx",
        textAlign: "left",
        padding: 0,
        height: "30px"
      };
      if ((column.title == '検査メモ' ||
        column.title == 'スケール状況' ||
        column.title == '措置対応' ||
        column.title == '代表点・設置有無' ||
        column.title == '見直し周期・次回時期' ||
        column.title == '見直し周期・保全方式' ||
        column.title == '改定理由' ||
        column.title == '改定理由コード') && row.approval == 0
      ) {
        style.background = "#DCDCFA";
        style.border = "0.5px solid rgb(233, 233, 233)";
      }
      return style;
    },

    handleCurrentChange(val) {
      console.log(val)
      this.$emit("getCRow", val);
      //  true未更改
      // eventBus.$emit('getDialog1Current_EventBus');

      // /**
      //  * 未更改，则正常执行。=>记录当前的row和index
      //  * 已更改，记录需要的东西。=》记录下次的row和index，记录执行的Fn,通知弹框。
      //  * 此处通过index来选中，row可能存在_row表格自动添加的属性影响，导致选不中。
      //  */

      // if (this.$store.state.isCurrentNext) {
      //   this.$emit("getMSTabelRow", val);
      //   this.currentRow = _.cloneDeep(val);
      //   this.currentIndex = this.getIndex(this.currentRow);
      // } else {
      //   console.log('sdfsdfsdf', this.currentRow, this.currentIndex);

      //   this.nextRow = _.cloneDeep(val);
      //   // this.nextIndex = this.getIndex(this.nextRow);
      //   this.setCurrentFn(this.currentRow, this.currentIndex);

      //   let Fn = () => {
      //     this.currentRow = _.cloneDeep(val);
      //     this.currentIndex = this.getIndex(val);

      //     this.$emit('GetLineIndexListApi', this.nextRow.lineNo);
      //   }
      //   this.$store.commit("changeIsCurrentFn", Fn);
      //   eventBus.$emit('saveFnDialog1Current_EventBus');
      // }
    },

    getIndex(row) {
      var result = 0;
      this.AData.forEach((item, index) => {
        if (_.isEqual(item, row)) {
          result = index;
        }
      })
      return result
    },

    //  通过name设置当前行
    setCurrentFn(row, index) {
      this.$refs.singleTable.setCurrentRow(this.AData[index]);
      if (index >= 9) {
        this.$refs.singleTable.pagingScrollTopLeft((index - 2) * 33);
      }
    },

    load() { },
  },
  // 创建前状态(里面是操作)
  beforeCreate() { },
  // 创建完毕状态(里面是操作)
  created() { },
  // 挂载前状态(里面是操作)
  beforeMount() { },
  // 挂载结束状态(里面是操作)
  mounted() {

  },
  // 更新前状态(里面是操作)
  beforeUpdate() { },
  // 更新完成状态(里面是操作)
  updated() { },
  // 销毁前状态(里面是操作)
  beforeDestroy() {

  },
  // 销毁完成状态(里面是操作)
  destroyed() { },
};
</script>
<style lang="scss" scoped>
.right-text {
  width: 100%;
  height: 100%;
  text-align: right;
}

.dateMessage {
  width: 100%;
  height: 100%;
  background: rgb(255, 255, 224);
}

::v-deep .el-table .cell {
  line-height: 32px;
}

.dateMessage {
  width: 100%;
  height: 100%;
  background: rgb(255, 255, 224);
}

::v-deep .el-table .cell {
  line-height: 32px;
}

.sizeColor {
  color: rgb(22, 22, 255);
}

// ::v-deep .elx-table .elx-body--row.row--checked,
// ::v-deep .elx-table .elx-body--row.row--current,
// ::v-deep .elx-table .elx-body--row.row--radio {
//   background-color: #e6f7ff;
// }

::v-deep .elx-table.border--full .elx-table--fixed-left-wrapper {
  border: 0 none;
}

::v-deep .elx-table .elx-table--fixed-left-wrapper.scrolling--middle {
  box-shadow: none;
}

::v-deep .el-table__body tr.current-row>td {
  background-color: rgb(233, 236, 237);
}

.tiemFlgS {
  font-size: 20px;
  font-family: "Menlo, Monaco, Courier New, monospace";
  line-height: 24px !important;
  text-align: center;
  height: 24px;
}

.bottomView {
  // background-color: #e9e9e9;
  height: 32px;
  line-height: 32px;
  padding-left: 10px;
}

.table-input {
  ::v-deep .el-input__inner {
    background: #DCDCFA;
    border: 0 none;
    padding: 0;
    height: 30px;
    line-height: 30px;
  }

  ::v-deep .el-input__icon {
    line-height: 30px;
  }
}

.table-input1 {
  ::v-deep .el-input__inner {
    background: #DCDCFA;
    border: 0 none;
    padding: 0;
    height: 30px;
    line-height: 30px;
    background-color: transparent;
    text-align: center !important;
    max-width: 78px;
    font-size: 14px;
  }

  ::v-deep .el-input__prefix {
    display: none;
  }
}

::v-deep .elx-cell {
  max-height: 50px !important;
}

::v-deep .elx-cell--title {
  height: 80px;
  line-height: 80px;
}
</style>
